/**
 * Project of Vehicle Routing Problem with Time Windows implements 
 * some of well-known algorithms for solving VRPTW.
 *
 * @author Michal Drobny  
 */

package logic.evaluator;

import logic.destination.Destination;
import logic.route.Cycle;

/**
 * Represents the interface Evaluator. Object that implements Evaluator assigns
 * a value to the path between two direct neighboring destinations. This value
 * can be gained as a static value from a table, but can be computed from other
 * sources (for example airline distance between two points such as Euclidean
 * distance). If the two destinations haven't direct path to each other, the
 * value assigned by the evaluator is negative.
 * 
 * @author Michal Drobny
 * @date 2.10.2014
 */
public interface Evaluator {

	/**
	 * Assigns a value between two direct neighboring destinations. If the two
	 * destinations haven't direct path to each other, the value assigned by the
	 * evaluator is -1.
	 * 
	 * @param first
	 *            The first destination
	 * @param second
	 *            The second destination
	 * @return The value (for example distance) or -1 if the destinations isn't
	 *         direct neighboring
	 */
	double evaluate(Destination first, Destination second);

	/**
	 * Assigns a value to cycle. It a sum of values between every two
	 * destinations on cycle.
	 * 
	 * @param cycle
	 *            The cycle
	 * @return The value (for example distance) or -1 if the destinations isn't
	 *         direct neighboring
	 */
	double evaluate(Cycle cycle);
}